package com.eyas.im.client;

import java.io.IOException;

public interface IMClient {
    enum ClientStatus {
        READY,
        STARTED,
        CLOSED
    }
    /**
     * 建立连接
     * @param hostname
     * @param port
     * @throws IOException 建立连接失败
     * @throws InstantiationException 实例化clientHandler失败
     * @throws IllegalAccessException 没有实例化handler的权限
     */
    void connect(String hostname, int port) throws Exception;

    /**
     * 安全关闭
     */
    void shutdwonGraceful();
}
